<?
require_once("admin_functions.php");
include_once("global_conf.php");
include_once("lib/exportData.php");
include_once("lib/main.php");

$f_info = substr($_REQUEST['fn'], 0, (strlen($_REQUEST['fn'])-6))."info";

$f = $_REQUEST['fn'];
$output = file_get_contents("export/".$f);
unlink("export/".$f);
unlink("export/".$f_info);

header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=$f");
header("Pragma: no-cache");
header("Expires: 0");
echo $output;
?>